package com.imot.controller;

import com.imot.response.Result;
import com.imot.service.StatusSituationService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.checkerframework.checker.units.qual.A;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * ClassName: StatusSituationController
 * Description:
 * date: 2023/11/29 10:51
 *
 * @author imot-jiah.wang
 */
@Api(tags = "大屏状态态势")
@RestController
@RequiredArgsConstructor
@RequestMapping("/api/statusSituation")
public class StatusSituationController {
    private final StatusSituationService statusSituationService;

    @GetMapping("/getAlertsCount")
    @ApiOperation("告警统计")
    public Result getAlertsCount(){
        Result result = statusSituationService.getAlertsCount();
        return result;
    }

    @GetMapping("/getCurrentStatus")
    @ApiOperation("当前状态")
    public Result getCurrentStatus(){
        Result result = statusSituationService.getCurrentStatus();
        return result;
    }

//    @GetMapping("/getThresholdEvaluation")
//    @ApiOperation("阈值判断")
//    public Result getThresholdEvaluation(String name){
//        Result result = statusSituationService.getThresholdEvaluation(name);
//        return result;
//    }

//    @GetMapping("/getExceptionLevelDistribution")
//    @ApiOperation("异常等级分布")
//    public Result getExceptionLevelDistribution(String date){
//        Result result = statusSituationService.getExceptionLevelDistribution(date);
//        return result;
//    }

    @GetMapping("/getExceptionDetails")
    @ApiOperation("异常详情")
    public Result getExceptionDetails(){
        Result result = statusSituationService.getExceptionDetails();
        return result;
    }


    @GetMapping("/getDataStatistics")
    @ApiOperation("数据统计")
    public Result getDataStatistics(String data){
        Result result = statusSituationService.getDataStatistics(data);
        return result;
    }


}

